xen/arm: assign static shared memory to the default owner dom_io
authorPenny Zheng <penny.zheng@arm.com>
Thu, 8 Sep 2022 13:55:06 +0000 (21:55 +0800)
committerStefano Stabellini <stefano.stabellini@amd.com>
Fri, 9 Sep 2022 19:57:58 +0000 (12:57 -0700)
commit5597f32f409c789199749b82585b96fef6969d21
tree26f7e3f8cc266e2f3e7dc491f1151f6ea4b14904
parent1d98281adf41abc7cf4c30f48349577dc42aa6c0
xen/arm: assign static shared memory to the default owner dom_io

This commit introduces process_shm to cope with static shared memory in
domain construction.

DOMID_IO will be the default owner of memory pre-shared among multiple domains
at boot time, when no explicit owner is specified.
And DOMID_IO is a fake domain and is not described in the Device-Tree.
Therefore When the owner of the shared region is DOMID_IO, we will only
find the borrowers when parsing the Device-Tree.
When we found the first borrower of the region, we need to assign the region to
DOMID_IO

This commit only considers allocating static shared memory to dom_io
when owner domain is not explicitly defined in device tree, all the left,
including the "borrower" code path, the "explicit owner" code path, shall
be introduced later in the following patches.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/domain_build.c
xen/common/domain.c